3.73 \(\int \frac{1}{(d+e x^n)^2 (a+b x^n+c x^{2 n})} \, dx\)

Optimal. Leaf size=368 \[ -\frac{c x \left (-2 c e \left (d \sqrt{b^2-4 a c}+a e+b d\right )+b e^2 \left (\sqrt{b^2-4 a c}+b\right )+2 c^2 d^2\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{\left (-b \sqrt{b^2-4 a c}-4 a c+b^2\right ) \left (a e^2-b d e+c d^2\right )^2}-\frac{c x \left (-2 c e \left (-d \sqrt{b^2-4 a c}+a e+b d\right )+b e^2 \left (b-\sqrt{b^2-4 a c}\right )+2 c^2 d^2\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{\left (b \sqrt{b^2-4 a c}-4 a c+b^2\right ) \left (a e^2-b d e+c d^2\right )^2}+\frac{e^2 x (2 c d-b e) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{e x^n}{d}\right )}{d \left (a e^2-b d e+c d^2\right )^2}+\frac{e^2 x \, _2F_1\left (2,\frac{1}{n};1+\frac{1}{n};-\frac{e x^n}{d}\right )}{d^2 \left (a e^2-b d e+c d^2\right )} \]

[Out]

-((c*(2*c^2*d^2 + b*(b + Sqrt[b^2 - 4*a*c])*e^2 - 2*c*e*(b*d + Sqrt[b^2 - 4*a*c]*d + a*e))*x*Hypergeometric2F1
[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])/((b^2 - 4*a*c - b*Sqrt[b^2 - 4*a*c])*(c*d^2 - b*d
*e + a*e^2)^2)) - (c*(2*c^2*d^2 + b*(b - Sqrt[b^2 - 4*a*c])*e^2 - 2*c*e*(b*d - Sqrt[b^2 - 4*a*c]*d + a*e))*x*H
ypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/((b^2 - 4*a*c + b*Sqrt[b^2 - 4*a*
c])*(c*d^2 - b*d*e + a*e^2)^2) + (e^2*(2*c*d - b*e)*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((e*x^n)/d)])/
(d*(c*d^2 - b*d*e + a*e^2)^2) + (e^2*x*Hypergeometric2F1[2, n^(-1), 1 + n^(-1), -((e*x^n)/d)])/(d^2*(c*d^2 - b
*d*e + a*e^2))

________________________________________________________________________________________

Rubi [A]  time = 0.706893, antiderivative size = 368, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 3, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.115, Rules used = {1424, 245, 1422} \[ -\frac{c x \left (-2 c e \left (d \sqrt{b^2-4 a c}+a e+b d\right )+b e^2 \left (\sqrt{b^2-4 a c}+b\right )+2 c^2 d^2\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{\left (-b \sqrt{b^2-4 a c}-4 a c+b^2\right ) \left (a e^2-b d e+c d^2\right )^2}-\frac{c x \left (-2 c e \left (-d \sqrt{b^2-4 a c}+a e+b d\right )+b e^2 \left (b-\sqrt{b^2-4 a c}\right )+2 c^2 d^2\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{\left (b \sqrt{b^2-4 a c}-4 a c+b^2\right ) \left (a e^2-b d e+c d^2\right )^2}+\frac{e^2 x (2 c d-b e) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{e x^n}{d}\right )}{d \left (a e^2-b d e+c d^2\right )^2}+\frac{e^2 x \, _2F_1\left (2,\frac{1}{n};1+\frac{1}{n};-\frac{e x^n}{d}\right )}{d^2 \left (a e^2-b d e+c d^2\right )} \]

Antiderivative was successfully verified.

[In]

Int[1/((d + e*x^n)^2*(a + b*x^n + c*x^(2*n))),x]

[Out]

-((c*(2*c^2*d^2 + b*(b + Sqrt[b^2 - 4*a*c])*e^2 - 2*c*e*(b*d + Sqrt[b^2 - 4*a*c]*d + a*e))*x*Hypergeometric2F1
[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])/((b^2 - 4*a*c - b*Sqrt[b^2 - 4*a*c])*(c*d^2 - b*d
*e + a*e^2)^2)) - (c*(2*c^2*d^2 + b*(b - Sqrt[b^2 - 4*a*c])*e^2 - 2*c*e*(b*d - Sqrt[b^2 - 4*a*c]*d + a*e))*x*H
ypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/((b^2 - 4*a*c + b*Sqrt[b^2 - 4*a*
c])*(c*d^2 - b*d*e + a*e^2)^2) + (e^2*(2*c*d - b*e)*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((e*x^n)/d)])/
(d*(c*d^2 - b*d*e + a*e^2)^2) + (e^2*x*Hypergeometric2F1[2, n^(-1), 1 + n^(-1), -((e*x^n)/d)])/(d^2*(c*d^2 - b
*d*e + a*e^2))

Rule 1424

Int[((d_) + (e_.)*(x_)^(n_))^(q_)/((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), x_Symbol] :> Int[ExpandIntegran
d[(d + e*x^n)^q/(a + b*x^n + c*x^(2*n)), x], x] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4
*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[q]

Rule 245

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, -((b*x^n)/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rule 1422

Int[((d_) + (e_.)*(x_)^(n_))/((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*
c, 2]}, Dist[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^n), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), In
t[1/(b/2 + q/2 + c*x^n), x], x]] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && NeQ
[c*d^2 - b*d*e + a*e^2, 0] && (PosQ[b^2 - 4*a*c] ||  !IGtQ[n/2, 0])

Rubi steps

\begin{align*} \int \frac{1}{\left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )} \, dx &=\int \left (\frac{e^2}{\left (c d^2-b d e+a e^2\right ) \left (d+e x^n\right )^2}-\frac{e^2 (-2 c d+b e)}{\left (c d^2-b d e+a e^2\right )^2 \left (d+e x^n\right )}+\frac{c^2 d^2-2 b c d e+b^2 e^2-a c e^2-\left (2 c^2 d e-b c e^2\right ) x^n}{\left (c d^2-b d e+a e^2\right )^2 \left (a+b x^n+c x^{2 n}\right )}\right ) \, dx\\ &=\frac{\int \frac{c^2 d^2-2 b c d e+b^2 e^2-a c e^2-\left (2 c^2 d e-b c e^2\right ) x^n}{a+b x^n+c x^{2 n}} \, dx}{\left (c d^2-b d e+a e^2\right )^2}+\frac{\left (e^2 (2 c d-b e)\right ) \int \frac{1}{d+e x^n} \, dx}{\left (c d^2-b d e+a e^2\right )^2}+\frac{e^2 \int \frac{1}{\left (d+e x^n\right )^2} \, dx}{c d^2-b d e+a e^2}\\ &=\frac{e^2 (2 c d-b e) x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{e x^n}{d}\right )}{d \left (c d^2-b d e+a e^2\right )^2}+\frac{e^2 x \, _2F_1\left (2,\frac{1}{n};1+\frac{1}{n};-\frac{e x^n}{d}\right )}{d^2 \left (c d^2-b d e+a e^2\right )}-\frac{\left (c \left (2 c^2 d^2+b \left (b-\sqrt{b^2-4 a c}\right ) e^2-2 c e \left (b d-\sqrt{b^2-4 a c} d+a e\right )\right )\right ) \int \frac{1}{\frac{b}{2}+\frac{1}{2} \sqrt{b^2-4 a c}+c x^n} \, dx}{2 \sqrt{b^2-4 a c} \left (c d^2-b d e+a e^2\right )^2}+\frac{\left (c \left (2 c^2 d^2+b \left (b+\sqrt{b^2-4 a c}\right ) e^2-2 c e \left (b d+\sqrt{b^2-4 a c} d+a e\right )\right )\right ) \int \frac{1}{\frac{b}{2}-\frac{1}{2} \sqrt{b^2-4 a c}+c x^n} \, dx}{2 \sqrt{b^2-4 a c} \left (c d^2-b d e+a e^2\right )^2}\\ &=\frac{c \left (2 c^2 d^2+b \left (b+\sqrt{b^2-4 a c}\right ) e^2-2 c e \left (b d+\sqrt{b^2-4 a c} d+a e\right )\right ) x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c} \left (b-\sqrt{b^2-4 a c}\right ) \left (c d^2-b d e+a e^2\right )^2}-\frac{c \left (2 c^2 d^2+b \left (b-\sqrt{b^2-4 a c}\right ) e^2-2 c e \left (b d-\sqrt{b^2-4 a c} d+a e\right )\right ) x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c} \left (b+\sqrt{b^2-4 a c}\right ) \left (c d^2-b d e+a e^2\right )^2}+\frac{e^2 (2 c d-b e) x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{e x^n}{d}\right )}{d \left (c d^2-b d e+a e^2\right )^2}+\frac{e^2 x \, _2F_1\left (2,\frac{1}{n};1+\frac{1}{n};-\frac{e x^n}{d}\right )}{d^2 \left (c d^2-b d e+a e^2\right )}\\ \end{align*}

Mathematica [A]  time = 0.940668, size = 327, normalized size = 0.89 \[ \frac{x \left (\frac{c \left (-2 c e \left (d \sqrt{b^2-4 a c}+a e+b d\right )+b e^2 \left (\sqrt{b^2-4 a c}+b\right )+2 c^2 d^2\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )}{b \sqrt{b^2-4 a c}+4 a c-b^2}+\frac{c \left (2 c e \left (-d \sqrt{b^2-4 a c}+a e+b d\right )+b e^2 \left (\sqrt{b^2-4 a c}-b\right )-2 c^2 d^2\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{b \sqrt{b^2-4 a c}-4 a c+b^2}+\frac{e^2 \left (e (a e-b d)+c d^2\right ) \, _2F_1\left (2,\frac{1}{n};1+\frac{1}{n};-\frac{e x^n}{d}\right )}{d^2}+\frac{e^2 (2 c d-b e) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{e x^n}{d}\right )}{d}\right )}{\left (e (a e-b d)+c d^2\right )^2} \]

Antiderivative was successfully verified.

[In]

Integrate[1/((d + e*x^n)^2*(a + b*x^n + c*x^(2*n))),x]

[Out]

(x*((c*(2*c^2*d^2 + b*(b + Sqrt[b^2 - 4*a*c])*e^2 - 2*c*e*(b*d + Sqrt[b^2 - 4*a*c]*d + a*e))*Hypergeometric2F1
[1, n^(-1), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])])/(-b^2 + 4*a*c + b*Sqrt[b^2 - 4*a*c]) + (c*(-2*c^2
*d^2 + b*(-b + Sqrt[b^2 - 4*a*c])*e^2 + 2*c*e*(b*d - Sqrt[b^2 - 4*a*c]*d + a*e))*Hypergeometric2F1[1, n^(-1),
1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(b^2 - 4*a*c + b*Sqrt[b^2 - 4*a*c]) + (e^2*(2*c*d - b*e)*Hype
rgeometric2F1[1, n^(-1), 1 + n^(-1), -((e*x^n)/d)])/d + (e^2*(c*d^2 + e*(-(b*d) + a*e))*Hypergeometric2F1[2, n
^(-1), 1 + n^(-1), -((e*x^n)/d)])/d^2))/(c*d^2 + e*(-(b*d) + a*e))^2

________________________________________________________________________________________

Maple [F]  time = 0.136, size = 0, normalized size = 0. \begin{align*} \int{\frac{1}{ \left ( d+e{x}^{n} \right ) ^{2} \left ( a+b{x}^{n}+c{x}^{2\,n} \right ) }}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x)

[Out]

int(1/(d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{e^{2} x}{c d^{4} n - b d^{3} e n + a d^{2} e^{2} n +{\left (c d^{3} e n - b d^{2} e^{2} n + a d e^{3} n\right )} x^{n}} +{\left (c d^{2} e^{2}{\left (3 \, n - 1\right )} - b d e^{3}{\left (2 \, n - 1\right )} + a e^{4}{\left (n - 1\right )}\right )} \int \frac{1}{c^{2} d^{6} n - 2 \, b c d^{5} e n + b^{2} d^{4} e^{2} n + a^{2} d^{2} e^{4} n + 2 \,{\left (c d^{4} e^{2} n - b d^{3} e^{3} n\right )} a +{\left (c^{2} d^{5} e n - 2 \, b c d^{4} e^{2} n + b^{2} d^{3} e^{3} n + a^{2} d e^{5} n + 2 \,{\left (c d^{3} e^{3} n - b d^{2} e^{4} n\right )} a\right )} x^{n}}\,{d x} + \int \frac{c^{2} d^{2} - 2 \, b c d e + b^{2} e^{2} - a c e^{2} -{\left (2 \, c^{2} d e - b c e^{2}\right )} x^{n}}{a^{3} e^{4} + 2 \,{\left (c d^{2} e^{2} - b d e^{3}\right )} a^{2} +{\left (c^{2} d^{4} - 2 \, b c d^{3} e + b^{2} d^{2} e^{2}\right )} a +{\left (c^{3} d^{4} - 2 \, b c^{2} d^{3} e + b^{2} c d^{2} e^{2} + a^{2} c e^{4} + 2 \,{\left (c^{2} d^{2} e^{2} - b c d e^{3}\right )} a\right )} x^{2 \, n} +{\left (b c^{2} d^{4} - 2 \, b^{2} c d^{3} e + b^{3} d^{2} e^{2} + a^{2} b e^{4} + 2 \,{\left (b c d^{2} e^{2} - b^{2} d e^{3}\right )} a\right )} x^{n}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")

[Out]

e^2*x/(c*d^4*n - b*d^3*e*n + a*d^2*e^2*n + (c*d^3*e*n - b*d^2*e^2*n + a*d*e^3*n)*x^n) + (c*d^2*e^2*(3*n - 1) -
 b*d*e^3*(2*n - 1) + a*e^4*(n - 1))*integrate(1/(c^2*d^6*n - 2*b*c*d^5*e*n + b^2*d^4*e^2*n + a^2*d^2*e^4*n + 2
*(c*d^4*e^2*n - b*d^3*e^3*n)*a + (c^2*d^5*e*n - 2*b*c*d^4*e^2*n + b^2*d^3*e^3*n + a^2*d*e^5*n + 2*(c*d^3*e^3*n
 - b*d^2*e^4*n)*a)*x^n), x) + integrate((c^2*d^2 - 2*b*c*d*e + b^2*e^2 - a*c*e^2 - (2*c^2*d*e - b*c*e^2)*x^n)/
(a^3*e^4 + 2*(c*d^2*e^2 - b*d*e^3)*a^2 + (c^2*d^4 - 2*b*c*d^3*e + b^2*d^2*e^2)*a + (c^3*d^4 - 2*b*c^2*d^3*e +
b^2*c*d^2*e^2 + a^2*c*e^4 + 2*(c^2*d^2*e^2 - b*c*d*e^3)*a)*x^(2*n) + (b*c^2*d^4 - 2*b^2*c*d^3*e + b^3*d^2*e^2
+ a^2*b*e^4 + 2*(b*c*d^2*e^2 - b^2*d*e^3)*a)*x^n), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{1}{b e^{2} x^{3 \, n} + a d^{2} +{\left (c e^{2} x^{2 \, n} + 2 \, c d e x^{n} + c d^{2}\right )} x^{2 \, n} +{\left (2 \, b d e + a e^{2}\right )} x^{2 \, n} +{\left (b d^{2} + 2 \, a d e\right )} x^{n}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")

[Out]

integral(1/(b*e^2*x^(3*n) + a*d^2 + (c*e^2*x^(2*n) + 2*c*d*e*x^n + c*d^2)*x^(2*n) + (2*b*d*e + a*e^2)*x^(2*n)
+ (b*d^2 + 2*a*d*e)*x^n), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(d+e*x**n)**2/(a+b*x**n+c*x**(2*n)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{{\left (c x^{2 \, n} + b x^{n} + a\right )}{\left (e x^{n} + d\right )}^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x, algorithm="giac")

[Out]

integrate(1/((c*x^(2*n) + b*x^n + a)*(e*x^n + d)^2), x)